<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .hide{
            display: none;
        }
    </style>
</head>
<body>
<input id='b1' type="button" value="开关">
<div class="c1">123</div>
<script src="jquery-1.12.4.js"></script>
<script>
    $('#b1').click(function () {
        $('.c1').toggleClass('hide')  //toggleClass,有这个样式就删除，没有就添加
    })
</script>
</body>
</html>